<template>
  <el-row class="sum-statistics">
    <template v-for="(item, index) in data">
      <el-col class="item" :key="index">
        <span class="title">{{ item.label }}</span>
        <span>{{ item.value }}</span>
      </el-col>
    </template>
  </el-row>
</template>

<script>
export default {
  name: "sumStatistics",
  props: {
    data: {
      type: Array,
      default() {
        return [];
      }
    }
  },
}
</script>

<style lang="scss" scoped>
.sum-statistics {
  .item {
    background: linear-gradient(135deg, #F5DCB5 0%, #E8967E 100%);
    flex-direction: column;
    align-items: center;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 16px;
    padding: 10px 0;
    display: flex;
    color: #FFF;
    width: 110px;

    &:nth-child(2n) {
      background: linear-gradient(135deg, #47CDD5 0%, #14CE66 100%);
    }

    &:last-child {
      margin-right: 0;
    }
    
    .title {
      margin-bottom: 10px;
    }
  }
}
</style>